package com.rachel.testjetpack.viewmodel;

import androidx.annotation.NonNull;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelProvider;

public class Main3ActivityViewModelFactory implements ViewModelProvider.Factory {

    private int count;

    public Main3ActivityViewModelFactory(int count) {
        this.count = count;
    }

    @NonNull
    @Override
    public <T extends ViewModel> T create(@NonNull Class<T> modelClass) {
        return (T) new Main3ActivityViewModel(count);
    }
}